using System.Diagnostics.CodeAnalysis;
using Microsoft.Xna.Framework;

namespace Xfinity.Weapons
{
    /// <summary>
    /// A ranged weapon.
    /// </summary>
    public abstract class RangedWeapon : Weapon
    {
        private Vector3 direction;

        /// <summary>
        /// The direction the weapon is pointing.
        /// </summary>
        /// <value>The direction.</value>
        public Vector3 Direction
        {
            get { return direction; }
            set { direction = value; }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RangedWeapon"/> class.
        /// </summary>
        public RangedWeapon():this(new WeaponProperties(),"",GameManager.Game)
        {
            
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RangedWeapon"/> class.
        /// </summary>
        /// <param name="properties">The properties.</param>
        /// <param name="name">The name.</param>
        /// <param name="game">The game.</param>
        public RangedWeapon(WeaponProperties properties, string name, Game game)
            : base(name, game)
        {

            this.properties = properties;
        }
        private WeaponProperties properties = new WeaponProperties();

        /// <summary>
        /// Gets the properties.
        /// </summary>
        /// <value>The properties.</value>
        public WeaponProperties Properties
        {
            get { return properties; }
        }
        /// <summary>
        /// Fires the specified fire type.
        /// </summary>
        /// <param name="fireType">Type of the fire.</param>
        /// <returns></returns>
        [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
        public virtual Projectile Fire(FireType fireType)
        {
            return new Projectile();
        }
    }
    /// <summary>
    /// The mode of fire.
    /// </summary>
    public enum FireType
    {
        /// <summary>
        /// The primary mode of attack. Usually a bullet.
        /// </summary>
        Primary,
        /// <summary>
        /// The secondary mode of attack. Usually a grenade or a bayonet.
        /// </summary>
        Secondary,
    }
}
